import React, { Suspense } from 'react'
import '@/App.less'
import { Link, NavLink, useRoutes } from 'react-router-dom'
import routes from './router'

function App() {
  return (
    <>
      <div className="App">
        <div className="app-header">
          <NavLink to={'/discover'} className="app-header-item">
            首页
          </NavLink>
          <NavLink to={'/mine'} className="app-header-item">
            我的
          </NavLink>
          <NavLink to={'/focus'} className="app-header-item">
            收藏
          </NavLink>
        </div>
        <Suspense fallback="loading">
          <div>{useRoutes(routes)}</div>
        </Suspense>
      </div>
    </>
  )
}

export default App
